#pragma once
#include "MeshComponent.h"

class Direct3D9API CBillboardSpriteComponent : public CMeshComponent
{

private:
	struct Vertex {
		D3DXVECTOR3		position;
		FLOAT			u, v;
		static const DWORD FVF;
	};

public:
	CBillboardSpriteComponent(void);
	~CBillboardSpriteComponent(void);

	void Render() const;

	ID3DXMesh* getMesh() { return m_pMesh; }		// temp interface

private:
	void _CreateBillboardMesh();
	void _PreRender() const;
	void _PostRender() const;

private:
	IDirect3DTexture9* m_pTex;
};

